   loadFrames: =>
     @destroyFrames()
     subject_info = @classification.subject.location
-    numImages = subject_info.standard.length
-    for i in [0...numImages]
+    for i in [0...@numFrames]
       frame_id = "frame-id-#{i}"
       frameImage =
         @markingSurfaceList[i].addShape 'image',


  onCreateTool: (tool) =>
    surfaceIndex = +@markingSurfaceList.indexOf tool.surface
    console.log 'tool created on surface', surfaceIndex

    if @asteroidMarkedInFrame[surfaceIndex]
      console.log 'clearing'
      @currAsteroid.clearSightingsInFrame surfaceIndex
      @destroyMarksInFrame(surfaceIndex)
    else
      console.log 'pushing'
      @el.find(".asteroid-frame-complete-#{surfaceIndex}").prop 'checked', true
      @asteroidMarkedInFrame[surfaceIndex] = true
    @updateIconsForCreateMark(surfaceIndex)


  updateGhostMark: (mark) ->
    for ghostMark in [ @el.find(".ghost-mark")... ]
      if parseInt(ghostMark.getAttribute 'from-frame') is (parseInt mark.frame) \
        and parseInt(ghostMark.getAttribute 'from-asteroid') is parseInt @currAsteroid.id
          ghostMark.remove()

  onDestroyMark: (mark) =>
    console.log 'mark.frame = ', mark.frame
    @destroyMarksInFrame mark.frame
    @updateIconsForDestroyMark mark.frame
