         phase = @ruleset_phase
         iruleset = @inverse_ruleset
         for i in [0...step_size]
-          phase = mod (phase-1), iruleset.length
-          @gol.untransform iruleset[phase]
+          phase = mod (phase-1), iruleset.size()
+          @gol.untransform iruleset.rules[phase]
           
         @ruleset_phase = phase
         @generation -= @step_size

          
      onStep: (rulesetPhase)->
        if (gc = @spaceship_catcher)
          if (@ruleset.length > 1) and not @ruleset_enabled
            alert "Rule is unstable, disabling catcher. Enable stabilization to make it available"
            @disable_spaceship_catcher()
          else

      #Evaluate pattern several steps until its ruleset phase is 0
      #Only usable in ruleset-based evaluation
      _promoteToZeroPhase: (pattern) ->
        #TODO
        unless @ruleset_enabled
          return pattern
        rule_phase = @ruleset_phase
        field_phase = 0
        while rule_phase isnt 0
          pattern = evaluateCellList @ruleset[rule_phase], pattern, field_phase
          rule_phase = (rule_phase+1)%@ruleset.size()
          field_phase ^= 1
        if field_phase
          pattern = Cells.offset pattern,1,1
