fix cursor history weirdness