Fix cursor navigation and delete char at specific position