Fix cursor problem