Fixing middle mouse drag -> paint bug