Fixing paragraph tag removal function