fix bug where empty filters didn't get removed