diff --git a/pkg.go b/pkg.go
index a5baa56..3f1647c 100644
--- a/pkg.go
+++ b/pkg.go
@@ -305,9 +305,14 @@ func (service *Service) StaticHandler(w http.ResponseWriter, r *http.Request, se
 
 		r.URL.Path = fmt.Sprintf("/%s/%s", comp[1], comp[2])
 		p := fmt.Sprintf(service.staticDirectory+"/%s/%s", comp[1], comp[2])
-		_, err = os.Stat(p)
-		if err == nil {
-			service.staticLocalFileserver.ServeHTTP(w, r)
+
+		if service.useStaticDirectory {
+			_, err = os.Stat(p)
+			if err == nil {
+				service.staticLocalFileserver.ServeHTTP(w, r)
+			} else {
+				service.staticEmbeddedFileserver.ServeHTTP(w, r)
+			}
 		} else {
 			service.staticEmbeddedFileserver.ServeHTTP(w, r)
 		}