fix a bug in ChangeTauOnVertex and ChangeROnVertex