fix a bug in app.js