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