ajax related patch https://www.drupal.org/node/1671336#comment-6197346