Fixes the null-pointer exception that was caused by the EndNode not having any outgoing Arcs.