Improve CURRENT_ENV resiliency