fixed bug where paragraphs were not going into the correct section