fix for http://drupal.org/node/1978838