Fixed API changes in Drupal 8.