Fix checking for request object to prevent dead lock