Fixed bug in directed graph.
Check if edge is an outgoing edge and add it to the the queue.
Last predecessor was missing.