fix gettdcontent and istdempty function bug.