Fixing strange Visual Studio errors