fixes keyup bug