Removed local declaration of risk_index. This is a module variable and should not be redeclared inside the module. It makes errors on risk_index_leagacy restart variable.