Fixed some problems with Windows.