Changed the behavior of WaitGroup