fix animation when pathfinding