Fix mouse bug in canvas