merged in fix for collision detection