correct bug where setting snapping was taking ages
mini refactor