fixed needlessly complex wait command