Fix leaf iterator.