Minor Fixes to CtoD Conversion Code