Fix cursor manager crash