Modified getting registry method.