fixes issue http://drupal.org/node/1303194#comment-6754920