fix filtering of categories with spaces in their names