Fixed bug with json/xml handlers using futures