Just added handling for invalid mouse-events