Fixed a crasher when trying to open up a temporary database.