Graph bugfixes