Fix department code handling.