some bug fixes for the graph visualization