clean up accidental use of some 0-indexed arrays as 1-indexed