fixed bug where by opt[:wait] would never set @wait