Fix bug in main.js