fixed RegEx bug in Firefox