Fixed mouse cursor movement handling issues