Corrected issue with pipe collision detection