Made NetworkEnvironment dependent from wifi state