fixing main.js errors...