Gui: Now cleans up database connections before exiting VM