Fix demos to accommodate new API changes.