Fix error with getting department_id