Fixed collision detection issues.