Fixes the mouse events handlers