fix bug in app initialize