some fixes in the reader and close the request in the next tick