fixed missing wg.Wait()