Fixed crash on DB destructor when not initialized