Couple small fixes to mouse event handling