Change MAX_ELEMS to 64 bit; missed from 2572d3528