fixed an error in getCostForBinnedFeature