fix sub/gsub.