         if not @logger?
             return ->
         else
-            return (args...) => @logger.debug("kucalc.Client.#{f}", args...)
+            # still need @logger? since it can get cleaned
+            # up when Project is being freed.
+            return (args...) => @logger?.debug("kucalc.Client.#{f}", args...)
 
     project: (opts) =>
         opts = defaults opts,

        if not @logger?
            return ->
        else
            return (args...) => @logger.debug("kucalc.Project('#{@project_id}').#{f}", args...)

    # free -- stop listening for status updates from the database and broadcasting
    # updates about this project.

                    dbg("error -- #{err}")
                    opts.cb(err)
                    return
                if x.state?.state not in ['running', 'starting', 'pending']
                    dbg("project not active")
                    opts.cb()
                    return
