Fix cursor hidding method