Better regex (yet again) and a small fix