Fix segfault when clicking on subcategory.