           @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

    for band in @bands
      @dfs[band] = new $.Deferred()
    
    # Set callback for when all channels and astrojs libraries received
    dfs = $.map(@dfs, (v, k) -> v)
    $.when.apply(null, dfs)
      .done(@allChannelsReceived)
    
    # Check cache for data
    if prefix of @cache
      cache = @cache[prefix]
      
      # Load files from cache
      for band, index in @bands


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
