Fixed VS2010 compiler errors