added sleep time to account for lag after win wait close