Change gsub flavor to return the value