Fixed random id initialization issue + double initialization placement check