Minor changes in main.js. Fixes #138