Fix use of gsub