Bug correction and debugging extended to Histdec