Sends text/html response instead of json