Stability fixes to import/export