Fix cursor flash problems