diff --git a/exec/load/layout.js b/exec/load/layout.js
index b7eb4884aec04a1f7b441b2d3a9cebe4460f7093..ce2bc77ac0115cfc675b6e67fe0c7cface5986aa 100644
--- a/exec/load/layout.js
+++ b/exec/load/layout.js
@@ -196,6 +196,8 @@ function Layout(frame) {
 	}
 	this.delView=function(title_or_index) {
 		var view = false;
+		if(title_or_index instanceof LayoutView)
+			title_or_index = title_or_index.title;
 		if(isNaN(title_or_index)) {
 			for(var v=0;v<properties.views.length;v++) {
 				if(properties.views[v].title.toUpperCase() == title_or_index.toUpperCase()) {
@@ -490,6 +492,8 @@ function LayoutView(title,frame,parent) {
 	}
 	this.delTab=function(title_or_index) {
 		var tab = false;
+		if(title_or_index instanceof ViewTab)
+			title_or_index = title_or_index.title;
 		if(isNaN(title_or_index)) {
 			for(var t=0;t<properties.tabs.length;t++) {
 				if(properties.tabs[t].title.toUpperCase() == title_or_index.toUpperCase()) {