updated fix for https://drupal.org/node/2153441