diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog
index 5071164cba..1ad474ddc0 100644
--- a/pandora_console/ChangeLog
+++ b/pandora_console/ChangeLog
@@ -1,3 +1,8 @@
+2011-07-29 Dario Rodriguez <dario.rodriguez@artica.es>
+
+	* godmode/groups/group_list.php: Fixed a bug that allow
+	to delete all agent groups and makes pandora unstable. 
+
 2011-07-29 Dario Rodriguez <dario.rodriguez@artica.es>
 
 	* godmode/modules/manage_network_templates_form.php: Fixed
diff --git a/pandora_console/godmode/groups/group_list.php b/pandora_console/godmode/groups/group_list.php
index d287cd40f5..adaa19f67c 100644
--- a/pandora_console/godmode/groups/group_list.php
+++ b/pandora_console/godmode/groups/group_list.php
@@ -302,8 +302,12 @@ if(!empty($groups)) {
 			$data[4] = '';
 		}
 		else {
+			
 			$data[4] = '<a href="index.php?sec=gagente&sec2=godmode/groups/configure_group&id_group='.$group['id_grupo'].'">' . html_print_image("images/config.png", true, array("alt" => __('Edit'), "title" => __('Edit'), "border" => '0'));
-			$data[4] .= '&nbsp;&nbsp;<a href="index.php?sec=gagente&sec2=godmode/groups/group_list&id_group='.$id_group.'&delete_group=1" onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;">' . html_print_image("images/cross.png", true, array("alt" => __('Delete'), "border" => '0'));
+			//Check if there is only a group to unable delete it
+			if ((count($groups) > 3) || (count($groups) <= 3 && $group['parent'] != 0)) {
+				$data[4] .= '&nbsp;&nbsp;<a href="index.php?sec=gagente&sec2=godmode/groups/group_list&id_group='.$id_group.'&delete_group=1" onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;">' . html_print_image("images/cross.png", true, array("alt" => __('Delete'), "border" => '0'));
+			}
 		}
 		
 		array_push ($table->data, $data);