fixes for spatial filtering