Smooth rp

Patch for a potential problem. Missing a constrain here I think.  Slightly complicated.  See email.