Added upcasting to 64-bit unsigned integer type to make printf happy