Fixed whitespace handling around empty lines.