Bug fix in Database::first, Database::all.