converted indices either exceeded the number of, elements (specified by `n`), or was still negative. r