changes to avoid null point when there are no filters