Fixed loop when done was signalled while waiting for count to go above zero