Prevent done() being called multiple times