Fixes a bug where interupting snapping would cause the plugin to stop working.