 
   updateGhostMark: (mark) ->
     for ghostMark in [ @el.find(".ghost-mark")... ]
-      ghostMark.remove() if ghostMark.getAttribute 'from-frame' is mark.frame and ghostMark.getAttribute 'from-asteroid' is @currAsteroid.id
-        
+      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 destroyed'
     console.log 'mark.frame = ', mark.frame
     @destroyMarksInFrame mark.frame
     @updateIconsForDestroyMark mark.frame


  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)

      @doneButton.prop 'disabled', false

    console.log @asteroidMarkedInFrame
    tool.controls.controller.setMark(surfaceIndex, @currAsteroid.id)

  onChangeFrameSlider: =>
