diff --git a/include/staff/helptopics.inc.php b/include/staff/helptopics.inc.php
index 8978b97e36c1b94b678d006dade0a26310992949..731bee7c99d6a871d7a2a250eb5182d265649519 100644
--- a/include/staff/helptopics.inc.php
+++ b/include/staff/helptopics.inc.php
@@ -123,6 +123,13 @@ $order_by = 'sort';
                 if ($topic->dept_id) {
                     $deptId = $topic->dept_id;
                     $dept = (string) $topic->dept;
+                    $department = Dept::lookup($deptId);
+                    if (!$department->isActive()) {
+                      $deptId = $defaultDept->getId();
+                      $dept = (string) $defaultDept;
+                      $topic->dept_id = $deptId;
+                      $topic->save();
+                    }
                 } elseif ($defaultDept) {
                     $deptId = $defaultDept->getId();
                     $dept = (string) $defaultDept;