Fixed script behavior in MSIE (and maybe Firefox idk whatever)