Fixed "fread() failed" bug on windows.