some bug fix - working with any category

some bug fix - working with any category