unregistering agent after request

without unregistering there was some bug, where agents were locked and
no envelopes could be fetched