fix import/export bugs