support case where env is None