US stocks claw back much of an early loss and finish mixed