fix graph builder