Replacing double lines with single lines