fix for environment from realm