Added functionality to handle chain of filters.