Fix bug when outputting env vars