various fixs in the regex generation