Yeah, that was done so that they wouldn't shoot each other. I tried to mitigate it by not spawning too many enemies at once. I guess the random enemy spawning played against you there :)
all good though, been there random spawns are hard to get right in my experiences.
was still a fun game though :)