fix deleteCategory function