WIP fixing more 64-bit indexing issues.