fixed compiler warning about implicit 64 to 32-bit conversion.