[FIX] Var referenced before assignment