fix for mouse events in global mode