Fix query error in 45_filtering

Closes #194