bug fixes for graph view
Fixed bugs in the way JSON representation is converted into a graph