diff --git a/menu_trail_by_path.module b/menu_trail_by_path.module
index 2efb879..0b1b8d3 100644
--- a/menu_trail_by_path.module
+++ b/menu_trail_by_path.module
@@ -14,13 +14,13 @@
  */
 
 /**
- * Implements hook_page_delivery_callback_alter().
- * 
+ * Implements hook_init to ensure active-trail gets set.
+ *
  * This is the only hook that occurs after the page callback, but before
  * hook_page_build (when blocks are added). We're using this hook for its
  * timing, not its data.
  */
-function menu_trail_by_path_page_delivery_callback_alter() {
+function menu_trail_by_path_init() {
   global $language;
   $parent_candidates = _menu_trail_by_path_get_parent_candidates(drupal_get_path_alias());
   // Don't even bother if current page is root.
@@ -117,7 +117,7 @@ function menu_trail_by_path_form($form, &$form_state) {
 /**
  * Returns an array of parent candidates
  *
- * e.g. given the argument 'foo/bar/zee', this returns an array of 
+ * e.g. given the argument 'foo/bar/zee', this returns an array of
  * internal Drupal paths for 'foo', 'foo/bar', 'foo/bar/zee'.
  *
  * @param string $path
