Fix mouse grab bug