Fixed metadata lookup in repo