diff --git a/server/plugins-available/apache2_plugin.inc.php b/server/plugins-available/apache2_plugin.inc.php
index f0e920346843207795c47a624cbb675527c94627..5a0c215d412a3802c9327211a027a42fdc515b92 100644
--- a/server/plugins-available/apache2_plugin.inc.php
+++ b/server/plugins-available/apache2_plugin.inc.php
@@ -1369,7 +1369,7 @@ class apache2_plugin {
 		
 		$folder_id = $data['old']['web_folder_id'];
 		
-		$folder = $app->db->queryOneRecord("SELECT * FROM web_folder WHERE web_folder_id = ".intval($folder_id));
+		$folder = $data['old'];
 		$website = $app->db->queryOneRecord("SELECT * FROM web_domain WHERE domain_id = ".intval($folder['parent_domain_id']));
 		
 		if(!is_array($folder) or !is_array($website)) {