Fix issue with middle mouse dragging