diff --git a/structr-ui/src/main/java/org/structr/web/servlet/HtmlServlet.java b/structr-ui/src/main/java/org/structr/web/servlet/HtmlServlet.java
index <HASH>..<HASH> 100644
--- a/structr-ui/src/main/java/org/structr/web/servlet/HtmlServlet.java
+++ b/structr-ui/src/main/java/org/structr/web/servlet/HtmlServlet.java
@@ -301,6 +301,9 @@ public class HtmlServlet extends HttpServlet implements HttpServiceServlet {
 				if (!securityContext.isVisible(rootElement)) {
 
 					rootElement = notFound(response, securityContext);
+					if (rootElement == null) {
+						return;
+					}
 
 				}
Always return if <I> to avoid exceptions about already committed response.