fixed graph not refreshing issue.