fixing up category and sort