Changes for Windows compatibility