fix json responses