Fixed issues when parameters changed rapidly