fixes #2 : waits for the expected number of callbacks before calling done()