Fixed runtime bug in app.js