Do bounding box filtering correctly