adjusting paragraph render to avoid empty p tags