Made import more robust