Bugfix for graphs