fix graph bug