set detectEnvironment to an array, again