Locking players in square zone has players tp'ed out side zone

ive created a zone via code 

 void CreateZone(Vector3 zonepos)
 {
     string[] messages = new string[12];
     messages[0] = "name";
     messages[1] = "Extractor";
     messages[2] = "id";
     messages[3] = "Extractor";
     messages[4] = "size";
     messages[5] = "350 200 550";
     messages[6] = "rotation";
     messages[7] = "128";
     messages[8] = "nochat";
     messages[9] = "true";
     messages[10] = "novoice";
     messages[11] = "true";
     ZoneManager?.Call("CreateOrUpdateZone", "Extractor", messages, zonepos);           
   
 }​
and added players like this
 ZoneManager.CallHook("AddPlayerToZoneKeepinlist", "Extractor", player);​

but when they try to leave they get teleported about 200m away in the direction they were trying to leave and then stay there due to not being in zone and teleport keeps going till i tp them back into zone

not sure why this happens

No Errors in console

Merged post

looking at code in zone manager 

 Vector3 position = zone.transform.position + (player.transform.position - zone.transform.position).normalized * (distance - 5f);​

im to that great at math . but the -5f will push away instead of in . or am i missing it now