Fixed up sorting mechanism