bug fixes on text editor window