If you want to clone a table from one variable to another, don't do t2 = t1, that will affect to t2 when t1 is changed. Instead create a function that clones values from a table to another.