fix and tweak regex