My son was and is still doing the same thing. He's 5 and still leaks here and there. I've gotten angry with him, I've even given him a pat on the butt because he knows better, but that certainly doesn't work. Be patient. The reason my son does this, is that he's too lazy to get up and go to the bathroom when he's in a serious game. He won't leave his friends for the bathroom, or when he's having too much fun. He'll sit there and jiggle until he's about to explode. When he starts doing the dance, I remind him to go and we'll wait for him to continue the game. I don't know if it's a boy thing. My daughter on the other hand, at 1 1/2 was potty trained and has been dry since then.
They'll grow up and before you know it, it'll be a short memory in the past. Another thing, try rewarding them when they've done their duty. Just don't make them insecure and feel they're doing something terribly wrong.
Take care