Fix Graph implementation.