Update main.js

Fix for #20