Fixed more Windows related bugs.