the command "bitcoin-cli getblockstats 0000000000000000000c61ff8f761ce509fc8901d3c22d61fec89637042ea2ba" does not work.

It displays "error: Error parsing JSON:0000000000000000000c61ff8f761ce509fc8901d3c22d61fec89637042ea2ba"

but it should display the block stats like the documentation says.

also bitcoin-cli getblockstats 0 does not work. block number must be at least 1 to work. But blocks start at 0.

tested with 0.20.1 on freebsd, another user on IRC acknowledged the problem.
: BaseIndex(std::move(chain), "coinstatsindex")
{
    fs::path path{gArgs.GetDataDirNet() / "indexes" / "coinstats"};
    fs::create_directories(path);
    m_db = std::make_unique<CoinStatsIndex::DB>(path / "db", n_cache_size, f_memory, f_wipe);
}
bool CoinStatsIndex::CustomAppend(const interfaces::BlockInfo& block)
{
    CBlockUndo block_undo;
    const CAmount block_subsidy{GetBlockSubsidy(block.height, Params().GetConsensus())};
    m_total_subsidy += block_subsidy;
    
    if (block.height > 0) {
        
        
        const CBlockIndex* pindex = WITH_LOCK(cs_main, return m_chainstate->m_blockman.LookupBlockIndex(block.hash));
        if (!UndoReadFromDisk(block_undo, pindex)) {
            return false;
        }
        std::pair<uint256, DBVal> read_out;
        if (!m_db->Read(DBHeightKey(block.height - 1), read_out)) {
            return false;
        }