Fix request handling with return $code. Fix on_body handler