prevent possible hanging on Windows