US stocks halve gains late in the day to close below key levels