fix: wait for groups to finish