fix bug with collisions