fix capture group bug