Fixed some VS2012 errors