Fix app initialization