Fixed bug where categories and subcategories would not work if they had special characters in them