Stocks waver as market sentiment improves