fix platform collision detection