Fixed import error checking bug