lib/filters.c returning incorrect length filters