imported_errors fix and more tests