Fixing error in main.js