fix a bug which happened after an import exception