fixed snap bug