More universal/efficient fix for scrubbing parameters [#1230]