fix insertStockCode if at last slide