fixed bug in filter