--- a/webui-standalone.py
+++ b/webui-standalone.py
@@ -10,7 +10,8 @@
 args = parser.parse_args()
 
 # change to webui's directory and import
-os.chdir(os.path.dirname(__file__))
+if os.path.dirname(__file__) != "":
+    os.chdir(os.path.dirname(__file__))
 
 # set up webui and run in own http server
 webui.bottle.debug(True)