Made importing more robust.