Fix json detection in response