Fixed CollisionDetection so that it wont go through all the if-statements