fix NPE in appGlobals