Fix errors with caret position and lower case button