remove unneed spaces in line ends