Stocks wobble as investors turn cautious after record highs