fix collisions infinite loop