Fixed some Windows-specific issues