Fixed small bug that might raise warning messages during destruction of databases.