Stocks mostly higher, but Nasdaq struggles to shake off losi