After you display text, you probably overwrite it with a 2D command.
Background:
If you have a background (like a text balloon, chat window, etc.) then make sure your text commands are AFTER these commands (usually paste image).
Sprites:
It is not advisable to use sprites. Because sprites always appear on top (except you use the command
draw sprites first). It would be better to use plain images in this case, or plains locked to the screen.
sync:
The sync command has to come AFTER the text commands, preferably just before
loop. Normally, this shouldn't give too many problems, but if you're working with
cls, and the other items listed above, I think you will have less problems.understanding your code later.
It's the programmer's life:
Have a problem, solve the problem, and have a new problem to solve.