fix spelling errors and invalid line breaking