fixes for https://drupal.org/node/2153781, https://drupal.org/node/2153441, and https://drupal.org/node/2153773