Updated for d8 changes