pathfinding failsafe

added failsafe to prevent assigning non-existent paths when failing to
find a path.