corrected a bug with resizing the window while inputing text