WARNING[13287] pbx.c: MSet: ignoring entry 'J' with no '='

I am running the following query in Asterisk 1.6.2.17.2 and FreePBX 2.8.1.4
to get CNAM info.

exten => _X.,n,Set(CALLERID(name)=${CURL(http://cnam.bulkCNAM.com:80/?id=xxxxxxxxxxxxxxxxxxxxxxxxxxx&did=${CALLERID(num)})})
exten => _X.,n,Set(DB(cidname/${CALLERID(num)})=${CALLERID(name)})

The result I get is:
VERBOSE[13287] pbx.c: – Executing [5141234567@custom-ptp-in:16] Set(“SIP/208.72.120.217-00000129”, “CALLERID(name)=Smith,J”) in new stack

followed by:
WARNING[13287] pbx.c: MSet: ignoring entry ‘J’ with no ‘=’ (in 5141234567@custom-ptp-in:16

and:
VERBOSE[13287] pbx.c: – Executing [5141234567@custom-ptp-in:17] Set(“SIP/208.72.120.217-00000129”, “DB(cidname/514444444)=Smith”) in new stack

It seems that Asterisk (or FreePBX?) does not like the “,” in “Smith,J” and strips the digit off thereby ruining my CNAM retrieval. Is there any way to fix this behavior? Can I modify the CNAM query to substitute the comma with a space or something?

I understand that callerID should not contain a comma and my provider should not send it but maybe I can strip it away somehow?