AdrianC: Fix env domain to be more robust