corrected for-each-A bug.  for-each index starts at value 1 instead of 0