Bug fix for custodian.
Bug fix for custodian.

materialsproject/custodian,specter119/custodian,davidwaroquiers/custodian,xhqu1981/custodian,materialsproject/custodian,specter119/custodian,alberthxf/custodian,materialsproject/custodian,specter119/custodian