fixing the bad request 400 error