Fixed two edge cases: single paragraph and whitespace-leading pages