Fix bad request format HTTP 400 error