With conditions fixed ordering changes, need to get first category id as
it is the largest