update snippet to fix IE8 issue