Added some changes to help running on windows.