small changes to allow compile on windows / visual studio