fix bug in filter