fix bug in filter check