Fixed bug where not closing an addCategoryButton.