Replace getOwnDb by getDb where necessary