Improved handling of import.