Changes to make it work under Visual Studio Compiler.