fixing bug with remembering text position