Fixes mouse events