Stocks end up mixed on Wall Street after early gains fade