bug fix when there is no background features (all in selectedFeatures)