Fix backwards logic in filter()
Merge pull request 69 from pekepeke

Closes #69.