fix error when dept not present