fixed a bug in idem compatibility