fix ^M problem in the editor