fix stuck in the corner issue