fixed errors on main.js
fixed main.js errors