Fixed segfault in app.d