fix loop over paragraphs