fixing mouse events