fixing sorting and finding for orders and common