restore waitgroup