diff --git a/layouts/v7/modules/Vtiger/resources/Detail.js b/layouts/v7/modules/Vtiger/resources/Detail.js
index f4dc16c66a72e6ce12a14298103bbbd9ff41d26d..67fe3ed17f66879e5c647154d0756b3912ffeace 100644
--- a/layouts/v7/modules/Vtiger/resources/Detail.js
+++ b/layouts/v7/modules/Vtiger/resources/Detail.js
@@ -2114,9 +2114,12 @@ Vtiger.Class("Vtiger_Detail_Js",{
 		var moduleName = currentTarget.attr('module');
 		var recordId = currentTarget.attr('record');
 		var rollupId = currentTarget.attr('rollupid');
-		var rollupstatus = currentTarget.attr('rollup-status');
+		var rollup_status = currentTarget.attr('rollup-status');
+		var rollupstatus = 0;
+		if (rollup_status == 0) {
+			rollupstatus = 1;
+		}
 		var viewtype = currentTarget.data('view');
-		var startindex = parseInt(currentTarget.attr('startindex'));
 		var contents, url, params;
 
 		if(viewtype == 'relatedlist') {
@@ -2133,7 +2136,7 @@ Vtiger.Class("Vtiger_Detail_Js",{
 		} else {
 			url = 'index.php?module='+moduleName+'&relatedModule=ModComments&view=Detail&record='+
 					recordId+'&mode=showRecentComments'+'&rollupid='+rollupId
-					+'&rollup_status=0&parent='+moduleName+'&rollup-toggle=1&limit=5';
+					+'&rollup_status='+rollupstatus+'&parent='+moduleName+'&rollup-toggle=1&limit=5';
 			contents = jQuery('div[data-name="ModComments"] div.widget_contents');
 			params = {
 				'type' : 'GET',
@@ -2144,7 +2147,7 @@ Vtiger.Class("Vtiger_Detail_Js",{
 				contents.html(data);
 				vtUtils.enableTooltips();
 				self.registerRollupCommentsSwitchEvent();
-				jQuery('#rollupcomments').bootstrapSwitch('state', !rollupstatus, true);
+				jQuery('#rollupcomments').bootstrapSwitch('state', rollupstatus, true);
 			});
 		}
 	},
diff --git a/modules/Vtiger/views/Detail.php b/modules/Vtiger/views/Detail.php
index e3d668df0c610e4da3743401d5ab1bb1ebbbb8a4..2d478f277ed2f94339633fa7f59487445f267cf0 100644
--- a/modules/Vtiger/views/Detail.php
+++ b/modules/Vtiger/views/Detail.php
@@ -472,7 +472,7 @@ class Vtiger_Detail_View extends Vtiger_Index_View {
 
 		if($rollupsettings['rollup_status']) {
 			$parentRecordModel = Vtiger_Record_Model::getInstanceById($parentId, $moduleName);
-			$recentComments = $parentRecordModel->getRollupCommentsForModule(0, 5);
+			$recentComments = $parentRecordModel->getRollupCommentsForModule(0, 6);
 		}else {
 			$recentComments = ModComments_Record_Model::getRecentComments($parentId, $pagingModel);
 		}