fix on recursive mask when there's only one recursive char as prefix or suffix