Updated array indices that were mangled when porting the code.