Categories page more robust

page no longer crashes when a delete button is pushed when there are
items in that category.