Fixed graph update bugs