Fix filter issue for certain configurations

@dehnhardt Please have a look and check if it is working for.