apply patch from https://www.drupal.org/node/2348021