Fix WASAPI shutdown crash