Improved cursor positioning.