optimize for param all (fixes #3894)