fix wait struct