Fix departments CRUD issue