Merge "Fix bug in measurement of paragraphs" into lmp-dev