Correctly sets the environment variable