fix compile errors in vs 2010