updated main.js for FF