Fixes for VS 12