Fix a semantic issue. I accidentally was initializing a shared pointer to point to tvec, when what we wanted was a shared pointer with a new value of the same type as tvec