improve handling of filters