#6 fix an IE8 JS incompatibility