fix p nesting