Fork of https://drupal.org/project/1336198