Fix broken collision code