fix sort-by-teacher-name bug