Fixed an issue with combining non-directed and directed graphs.