Fixed bug with collisions