Stocks close lower after an early rally fizzes out