Small and mid-sized manufacturers' optimism deteriorates