diff --git a/NEWS b/NEWS
index 40cfa264a..16b23fff8 100644
--- a/NEWS
+++ b/NEWS
@@ -4,6 +4,7 @@ ver 0.21.5 (not yet released)
   - fix "tagtypes disable" command
 * database
   - simple: fix assertion failure
+  - fix assertion failures with mount points
 * input
   - buffer: fix crash bug when playing remote WAV file
 * tags
diff --git a/src/db/plugins/simple/Directory.cxx b/src/db/plugins/simple/Directory.cxx
index a1f2d15e4..27602afc2 100644
--- a/src/db/plugins/simple/Directory.cxx
+++ b/src/db/plugins/simple/Directory.cxx
@@ -45,6 +45,11 @@ Directory::Directory(std::string &&_path_utf8, Directory *_parent) noexcept
 
 Directory::~Directory() noexcept
 {
+	if (mounted_database != nullptr) {
+		mounted_database->Close();
+		mounted_database.reset();
+	}
+
 	songs.clear_and_dispose(Song::Disposer());
 	children.clear_and_dispose(DeleteDisposer());
 }