On Halloween, the president reminded Democrats how terrifying a gaffe can be