                         count  : if opts.paths.length > 3 then opts.paths.length
 
     download_file: (opts) =>
-        {download_file, open_new_tab} = misc_page
+        {download_file, open_new_tab} = require('./misc_page')
         opts = defaults opts,
             path    : required
             log     : false

            url  = (window.app_base_url ? '') + @_url_in_project('files/' + opts.path)
            url += '?session=' + misc.uuid().slice(0,8)
            url += '&fullscreen=default'
            misc_page.open_popup_window(url, {width: 800, height: 640})
            return

        @_ensure_project_is_open (err) =>

{webapp_client} = require('./webapp_client')
{project_tasks} = require('./project_tasks')
{types, defaults, required} = misc

{Actions, rtypes, computed, depends, project_redux_name, Table, redux}  = require('./smc-react')

