Fix nested filters and add sample/test.