Fix a bug with IE8 compatibility