improve params filtering, closes #1776