Made compatible with VS 2012