Fix filter and add test for list