The script does not seem to give problems until it gets large. I tried for over two hours to get the problem to happen with only small snippits of code.

Sorry for the large post.