Fixed RegExp error in IE8