Pointshop nill value

getting this error only on my public TTT server not on private sandbox :
[ERROR] addons/pointshop/lua/cl_pointshop.lua:178: attempt to index field ‘_Hats’ (a nil value)

  1. Function - addons/pointshop/lua/cl_pointshop.lua:178
  2. unknown - lua/includes/modules/usermessage.lua:87

usermessage.Hook(“PointShop_AddHat”, function(um)
local ply = um:ReadEntity()
local item_id = um:ReadString()

if not ply or not item_id then return end

local item = POINTSHOP.FindItemByID(item_id)
if not item then return end

if not ply._Hats then
	ply._Hats = {}

** if ply._Hats[item_id] then return end**

local mdl = ClientsideModel(item.Model, RENDERGROUP_OPAQUE)

ply._Hats[item_id] = {
	Model = mdl,
	Attachment = item.Attachment or nil,
	Bone = item.Bone or nil,
	Modify = item.Functions.ModifyHat or function(ent, pos, ang) return ent, pos, ang end


also having problems with pos and scale of items :
ModifyHat = function(ent, pos, ang)
ent:SetModelScale(1.6, 0)
pos = pos + (ang:Forward() * -7) + (ang:Up() * 8)
ang:RotateAroundAxis(ang:Right(), 90)
return ent, pos, ang

code just dont work at all. which i think links to the code at top so both problems could be related.