Resolve errors when compiled in msvc2010, and  any changes.