fix importnym, added some more checks