Fix bug where changing filter type would make patients disappear