fixed graph bug