Adds a category fileter. This fixes a bug with filtering categories.