Fix app not defined