Backport to vs2010