 
         if asUser
         then @addUsers {targets, asOwner, permanent}, callback
-        else @removeUsers targets, callback
+        else @removeUsers {targets, permanent}, callback
 
       else
         callback new KodingError "Target does not support machines."

    # passing False for owner
    {user, asOwner, permanent} = options

    newUsers = excludeUser users, user
    newUsers.push { id: user.getId(), owner: no, approved: no, permanent }

    return newUsers

    if isOwner user, this
      return callback null

    options = target: [user.username], asUser: no, permanent: yes

    @shareWith options, (err)->
      callback err
