Correctly register dependencies to remove notification correctly.