Bug fixes with regular expressions