fixed filtering with catgories with more than two words per category