Fix cursor compile bug