Fix 64-bit to 32-bit shortening warnings