Fix callbacks for editing, see https://drupal.org/node/2092261.