Fix generating config for env