fixing (of course) regex bugs