Thanks that pointed showed 2 things I'm doing wrong.
1) the restoring. when I put that back I had the
same issue on my script but not on the snipit given here
the difference is I'm using a reference to an array
in the script and so I'm not doing a copy I'm doing
a ?pointer? is there anyway to stop that?