fix graph problem