Change the attaching of settings to the new way (https://www.drupal.org/node/2382557)