trying to fix a bug on replaceQuotes