Bug fix: snapToGrid with mouse pointer