Fixed the bug where the cursor wouldn't increment when inserting characters