Fix response json encoder