Path EnvVar: Bugfix + optimize, thanks kon