workaround for Visual Studio compiler bugs