improve reply handling when doing a request