Fix cursor style in the right place