Fix copy table issue