fixed environment variable expansion