Shared publicly  - 
The perils of poorly formatted code in Stack Overflow questions. I originally missed what is probably the cause of the OP's problem because of the horizontal scrolling of the code in this question. It hides the flaw in the code.
Michael Sanford's profile photo
That's why I set my IDE's tab to 2 spaces, and indent only one tab per sub-block. Why do more? It just renders the code unreadable.
Add a comment...