It might be helpful if you post more or all of your code. I attempted to re-create your situation and after a bit of juggling I was able to reproduce part of the problem. It displayed two lines of 1's (not 4).