bugfix: json_response was being leaked