Workaround for compiler bug in Visual Studio