Fix for JS errors in Internet Explorer