Patch for windows compatibility