pathfinding error fixed

some more fixes & comments