The problem of the input larger as the screen is solved.
That is one problem solved.
The other one you describe is a nasty one.
This error can be triggered from several different places in you code.
perhaps you can read this one tseyfarth had similar problems, http://www.kbasic.com/forum/viewtopic.php?f=8&t=676