Fixed Environment Variable check