There's a bug that continuously spawns the mages and rangers after they spawn. You may need to add a check if they're already spawned and if so can more spawn before the next threshold.
Please try it again, I was fixing a menu sorting issue and accidentally left the debug tools on lol
Ha, yep, that'll do it!