Fix collision code