fix bad request problem