Fixed mouse-mode/mode-mouse problem