bug map was not reset before pathfinding