fix bug 846209 - handle empty p elements