fix wait flag
small fix