added sorting to db:fix