fix some bugs.
use unix line delimiter (\n)