multi-region bug fix

1. strip number merging bug fixed.
2. romove the "\r" char in output.
mutli-region bug fix 2

the previous commit is not complete