Fixed a couple errors, including an ill-formed regexp.