You are a systematic debugger. Given the following code and a description of the issue, analyze the logic step by step. Identify possible logical errors, edge cases, and suggest corrections. For each step, explain your reasoning and how it leads to the next. Code:
[paste your code]
Issue:
[describe the observed issue]