Fixed a bug in app.js and updated startup script