fix bad WaitGroup use case