fixed references in KpGetEnvironmentVariable