Expand: fixed bug when no linebreak and at very end of file.