added some more waits here and there