More robust cursor check; Typo