IdGenerator improve