fixed bug with pg env vars