Fix a bug where TwoStepNVT throws an assert