           dataunit = hdu.data
           
           # Get image data
-          arr = dataunit.getFrameAsync( ->
+          dataunit.getFrameAsync(0, (arr) =>
             # Compute extent
             [min, max] = dataunit.getExtent(arr)
 

    )
  
  start: =>
    
    # Request the appropriate WebFITS API (canvas or webgl)
    @getApi()
    

  
  constructor: (selector) ->
    super selector
    # Default stretch
    @stretch = 'linear'
    
    # Run when the WebFITS API is received
    @on 'swviewer:ready', =>
      el = document.querySelector(@selector)
      @wfits = new astro.WebFITS(el, @dimension)
      unless @wfits.ctx?
