S&P 500, Nasdaq end 3-day losing streak after Fed minutes