Fixed minor things to get it to compile on windows