Fixed line ending bug