Fixed iterator sorting.