fixing bug with encoding of commas