Fix mouse bugs