fixDeniedParagraphHierarchy function to fix bug #89