fix bugs about table copy alogorithm