Fix a problem when done() was called multiple times