Updated head.js to fix some issues with firefox