Fixed fatal windows bug