Fix usage of deprecated Registry method