Pirate targeting 2nd sub?

I fired two subs at a site with a pirate. First sub had more drillers than what was at the site. Second sub had martyr. Opponent fired a sub with pirate and zero drillers and was able to detonate my martyr? Is t this a bug? Shouldn't the pirate have hit the first sub with all my troops?