idGenerator bug fixed