Fixed warnings in VS2012: C4018 and C4244.