fix the problem caused by newline character