fix usedFeature generation bugs