fix the request handler