Fixed bug in main.js