Fix app environment