Fixed getGraph bug