Improved cursor recognition.