gsub error resolved