Fix threshold generation for StockLevel.