Bugfix in filtering