Fix problem with Categories delete function