diff --git a/web/pgAdmin4.py b/web/pgAdmin4.py
index 40ca3ec..556aa5c 100644
--- a/web/pgAdmin4.py
+++ b/web/pgAdmin4.py
@@ -53,9 +53,6 @@ if not os.path.isfile(config.SQLITE_PATH):
 # Create the app!
 app = create_app()
 
-if config.DEBUG:
-    app.debug = True
-
 # Start the web server. The port number should have already been set by the
 # runtime if we're running in desktop mode, otherwise we'll just use the
 # Flask default.
@@ -70,6 +67,10 @@ else:
     server_port = config.DEFAULT_SERVER_PORT
 
 try:
-    app.run(port=server_port)
+# Make sure reloader is disabled in debug mode
+    if config.DEBUG:
+        app.run(port=server_port,debug=True,use_reloader=False)
+    else:
+        app.run(port=server_port)
 except IOError:
     app.logger.error("Error starting the app server: %s", sys.exc_info())
