Fixed a snap-to-grid glitch