Fixed issue with some request returning drupal html with json response.