Fixed bug in filter.