Fix 1-based index for Fortran array