     state.setUrl()
     if action.type != 'fork'
       # bundle implicit fork with next action
-      action.fork = site
+      action.fork = forkFrom
       wiki.addToJournal pageElement.find('.journal'),
         type: 'fork'
-        site: site
+        site: forkFrom
         date: action.date
-  if wiki.useLocalStorage() or site == 'local'
-    pushToLocal(pageElement, action)
+
+  # store as appropriate
+  if wiki.useLocalStorage() or pageInformation.site == 'local'
+    pushToLocal(pageElement, pageInformation, action)
     pageElement.addClass("local")
   else
-    pushToServer(pageElement, action)
+    pushToServer(pageElement, pageInformation, action)
 

      wiki.log "ajax error callback", type, msg

pageHandler.put = (pageElement, action) ->
  wiki.log 'pageHandler.put', pageElement, action, 'pageElement-site', pageElement.data('site')
  action.date = (new Date()).getTime()
  delete action.site if action.site == 'origin'
  if (site = pageElement.data('site'))? and site != 'origin' and site != 'local'
    # pull remote site closer to us
    pageElement.find('h1 img').attr('src', '/favicon.png')
    pageElement.find('h1 a').attr('href', '/')


pageHandler.context = []

pushToLocal = (pageElement, pageInformation, action) ->
  page = pageFromLocalStorage pageInformation.slug
  page = {title: action.item.title} if action.type == 'create'
  page ||= pageElement.data("data")
  page.journal = [] unless page.journal?
  if (site=action['fork'])?
    page.journal = page.journal.concat({'type':'fork','site':site})
    delete action['fork']
  page.journal = page.journal.concat(action)
  page.story = $(pageElement).find(".item").map(-> $(@).data("item")).get()
  localStorage[pageInformation.slug] = JSON.stringify(page)
  wiki.addToJournal pageElement.find('.journal'), action

pushToServer = (pageElement, pageInformation, action) ->
  $.ajax
    type: 'PUT'
    url: "/page/#{pageElement.attr('id')}/action"
