bug fixin in regexp match