fix bug when # appears in the output of energy correction program