fixed bug that allowed a node to have a path to itself
Fixed issues where node could create path to itself