Update cursor position

Ensure cursor is placed at the end rather than the front.