bug fix to app.js