                 data.site_id = dst_site.get('_id').val()
                 db.get('objects').insert data, (err, new_data) ->
                   id_mapping[old_id] = new_data.val()._id
-                  objects_cloned.push new_data
+                  next null, new_data
                   exit err if err
-                  next()
-              ), (err) ->
+              ), (err, objects_cloned) ->
+                console.log objects_cloned, 'zzzz'
 
                 # clean up references
-                async.map objects_cloned ((object, next) =>
+                async.forEach objects_cloned, ((object, next) ->
                   object_val = object.val()
                   str_json = JSON.stringify(object_val, null, 3)
                   replaced = false

  when 'clone'

    id_mapping = {}
    objects_cloned = []
    src_slug = args[0]
    dst_slug = args[1]


              exit err if err

              # insert pages
              async.map objects, ((object, next) ->
                data = object.val()
                old_id = data._id
                delete data._id
