Fix ugly Stop and Wait error