fixes Errors when unplug device on windows Issue #95

should fix Issue #95