Minor fix to chrod prog function