Fixed semi-uncaught ReferenceError in do_import