fixed by using a copy.copy() of the record returning a copy without modify the original