fixing error in collision