fixed graph problem