Update main.js

Thanks for the tip ;)