Small modification to static/js/main.js. Bug fixing