Fix replacing type list to regexp.