Fixed ForEnvironment sample