Update idmanager.c

More clean init