The indenting in your code is horrible. Use Tools + Auto Format to fix that. Then, post ALL of your code. We can't comment on the action of a function seeing only it's name.
Is this something due the way the buffer is filling up?
What buffers?
delay(100);
Certainly doesn't help.