Restore register and autodiscover in __init__