Fixed some minor issue to allow compilation on Visual Studio