Stocks gain back some lost ground