Better behavior when filtering by type (closing open markers/windows)