This is called sumissive peeing and should be handled carefully because the wrong actions will worsen the condition. Here's one link, but there is a great deal of information on this behavior.
Sumissive Urination All the experts agree on one thing, never punish for this.