Add idempotency to .end() and done()
Add end idempotence test