Fixed issue with order of arguments when calculating collisions.