--- advanced-portfolio.orig	Fri May 27 06:53:52 2011
+++ advanced-portfolio.scm	Fri May 27 07:00:10 2011
@@ -545,7 +545,7 @@
 
 				     (if (gnc-numeric-zero-p dividend-rein)
 					 ;; no reinvested dividend, return just the income split
-					 (xaccSplitGetValue s)
+					 dividend-income
 					 ;; dividend reinvested so
 					 ;; apply the ratio to the
 					 ;; dividend and return it for
