fix the problem crash when compiled in vs2008