fixed some errors on Windows