Fixed a RegExp bug