clean bad request handling