Bug fix for get.graph.sp