Fixed cursor moving into start/end positions.