Entity spawning help

Hello, I have some entities I want to replace. I got working code, but instead of spawning one random gun from a table, it decides to spawn all of them. I don’t know how/why it’s doing this, and how to fix it. Here’s the code I used.


for k, ent in pairs(table.Merge(ents.FindByClass("weapon_ttt*") , ents.FindByClass("weapon_zm*")) do
	local weaponpos = ent:GetPos()
	local randomnewweps = {"weapon1", "weapon2", "weapon3", "weapon4", "weapon5"}
    ent:Remove()
	local newweps = ents.Create(table.Random(randomnewweps))
	newweps:SetPos(weaponpos)
	newweps:Spawn()
	newweps:Activate()
end

The weapon1-5’s are weapon class names. The code works in game, but like i said before, instead of taking the place of one guns, all the weapons spawn where that entity was.

[editline]30th August 2013[/editline]

Still haven’t figured it out.