Fix bug in paragraph generation