Fixed compile issues in Visual Studio