S&P closes barely lower despite North Korea tensions