Fixes in main.js