Fixed JSON escaping in listener
Updated version