fixed signed return on uint64_t return type