well firstly get them fixed so that this doesnt become a problem in the future

secondly, i work at a dog kennel where they have grooming, training, daycare, and boarding. I supervise the unit 3 dogs (the largest are the hardest playing of the 3 groups) and this is somthing that happens almost all day. most of it just comes down to a dominance thing. the best thing you can do for it is teach your dog the "off" command. when you catch them doing it make them stop and say "(name) off!" and soon enough you wont even need to do it physically, you can just use the command and they will know.