fix invalid memory address or nil pointer dereference when insert filters in 'add', 'and' or 'or'