fixed logic erros in IDPException