fix critical bug in Application.java