Fixed a bug in running graphs.