A little regex fix and improvement