diff --git a/modules/statistics/lib/Graph/GoogleCharts.php b/modules/statistics/lib/Graph/GoogleCharts.php
index 73143687eb247ed3732535bf52ebdf97025c1a7c..0bfb9d09bfe4f30b0fe768e8cee442d613196a20 100644
--- a/modules/statistics/lib/Graph/GoogleCharts.php
+++ b/modules/statistics/lib/Graph/GoogleCharts.php
@@ -45,8 +45,8 @@ class sspmod_statistics_Graph_GoogleCharts {
 		
 		foreach($values as $k => $v){ 
 			if($v >= 0 && $v <= 100){ 
-				$first = substr($extended_table, round( ($delta*$v/100) / $size),1); 
-				$second = substr($extended_table, round( ($delta*$v/100) % $size), 1); 
+				$first = substr($extended_table, intval( ($delta*$v/100) / $size),1);
+				$second = substr($extended_table, intval( ($delta*$v/100) % $size), 1);
 				$chardata .= "$first$second"; 
 				#echo '<p>encoding ' . $v . ' to ' . $first . ' ' . $second . '';
 			} else {