             @wfits.loadImage(band, arr, width, height)
             
             # Cache some data
-            @cache[prefix][band].min = min
-            @cache[prefix][band].max = max
-            @cache[prefix][band].arr = arr
-            @cache[prefix][band].width = width
-            @cache[prefix][band].height = height
-            @cache[prefix][band].calibration = calibration
+            @cache['prefix'][band].min = min
+            @cache['prefix'][band].max = max
+            @cache['prefix'][band].arr = arr
+            @cache['prefix'][band].width = width
+            @cache['prefix'][band].height = height
+            @cache['prefix'][band].calibration = calibration
             
             @dfs[band].resolve()
           )
+  
+  onError: =>
+    @trigger 'close'
   
   # NOTE: Using exposure time = 1.0
   getCalibration: (header) ->

          @dfs[band].resolve()
    else
      # Request from remote source
      @cache[prefix] = {}
      for band, index in @bands
        do (band, index) =>
          @cache[prefix][band] = {}
          path = "#{@source}#{prefix}_#{band}.fits.fz"
        
          new astro.FITS.File(path, (fits) =>
            hdu = fits.getHDU()
            header = hdu.header
            dataunit = hdu.data


class Viewer extends Controller
  dimension: 441
  bands:  ['g', 'r', 'i']
  source: 'http://spacewarps.org.s3.amazonaws.com/subjects/raw/'
  
  cache: {}
  
  parameters:
    0:
      alpha: 0.09
