When my JS works better in IE than Firefox