Fix bug where NULL terminator was inserted when not apporite and when text was not drawn until pressing a button upon loading a text file