Fix exception when calculating fdh.