Attempt to accomodate graphs with cycles