Fix mouse emulation