Adding debug code for collisions