Fix Javascript error on Internet Explorer