fix bug in id_mgr