Fixed missing metadatabase reference

Fixed reference to missing metadatabase, which prevented it from being
anywhere else than in the stage database.