Fix app level env check