Added some changes to try to get working in windows