#79 Don't remove listeners until after end so 'close' event gets emitted.