fix bug for env