fixed a bug in app.js