small fix for mouse events firing outside of canvas