Fixed issues related to snapping on collision