Fix bugs in DaggerApplication