Thanks for the patch! I am not sure it is needed though. You can simply assign tm after encode(). Grep `xrow_encode_vclock()` to see examples where sync is assigned after encode, it looks fine. Too many changes just for a single usage.