fix bug in graph singleton