Solved RegExp bug