           @dfs[band].resolve()
     else
       # Request from remote source
-      @cache[prefix] = {}
+      @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) =>
+            if fits is null
+              errDfd.resolve()
+              return
+            
+            @cache['prefix'][band] = {}
+            
             hdu = fits.getHDU()
             header = hdu.header
             dataunit = hdu.data

            @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
            
            @dfs[band].resolve()
          )
  
  # NOTE: Using exposure time = 1.0
  getCalibration: (header) ->


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
