Fixed some issues under VisualStudio2010.