fixed orderby to match data store implementation