Fixed graph bugs