fix app be null in handleglobal problem