Windows debug crash fix