some fixes in stock_recovery stuff