reset wd in every case