bugfixes and hopefully a graph fix