Fixed msvc2008 build, small optimization.