Fixed auto-gain / gain param change ordering bug (thanks to wji)