Fixed some minor issues on Windows