updated id generators and fixed the root key issue