bugfix for smart filtering (not tested yet)