Fix graph bug during import