fixed bug on text editor