Fix issue with categories not grouping when their names have spaces