fixed bugs related to line spacing and newlines