Issues with teams & title interaction

I'm creating a datapack for a server I'm running, and one of the mechanics is a random assignment of a team. That's all figured out and done, but my issue is with the notification the players are supposed to get. When you're selected a function automatically runs for both teams but for some reason only one is being sent out and its sent towards.. everyone. It works fine when i run the commands in game, but as a function its bugging out. If i could get some help it would be great!

FUNCTION VRANDOM

execute at @a[team=Victim] run function loop:vnotice
schedule function loop:krandom 1s append```

FUNCTION VNOTICE
```title @a[team=Victim] title [{"text":"You are the ","color":"dark_purple"}]
title @a[team=Victim] subtitle [{"text":"Target"}]
title @a[team=Victim] actionbar [{"text":"You are the target. You must survive the Prosecutor.","color":"dark_purple"}]```

functions knotice and krandom are the exact same but with the opposite team
Continue to help post