Fix compile problems on Windows 8

MSVC 2012 RC reported an error that a minus lateral on an unsigned type will still yield unsigned, so I prefixed a 0 to achieve type conversion.