fix for main.js when not using jquery