Improve some internal realm usages.