fix implementation of --only-graph