Add regenerating mode detect to sign