filter.c: small fixes