Fixed reconnect in app.js
Implemented reindexation