      [ph/field-after blocks state nil]]))
 
 (defn edit-profile-content [state]
- (fn []
-  [:div (if (= 0 @(cursor state [:active-index]))
-         [:div#page-edit
-           [pe/action-buttons state]
-           [:div.panel.thumbnail
-            [:div.panel-heading
-             [:h1 (t :profile/Personalinformation)]]
-            [:div.panel-body
-             [pe/edit-profile state]]]
-           [profile-blocks state]]
-         @(cursor state [:tab-content]))]))
+  (fn []
+    [:div (if (= 0 @(cursor state [:active-index]))
+            [:div#page-edit
+             [pe/action-buttons state]
+             [:div.panel.thumbnail
+              [:div.panel-heading
+               [:h1 (t :profile/Personalinformation)]]
+              [:div.panel-body
+               [pe/edit-profile state]]]
+             [profile-blocks state]]
+            @(cursor state [:tab-content]))]))
 
 (defn view-profile [state]
   (let [blocks (cursor state [:blocks])]
     [:div;#profile
      (if (= 0 @(cursor state [:active-index]))
-      [:div#page-view
+       [:div#page-view
         [:div {:id (str "theme-" (or @(cursor state [:theme]) 0))
-                  :class "page-content"}
-            [:div.panel
-             [:div.panel-left
-              [:div.panel-right
-               [:div.panel-content
-                [:div.panel-body
-                 [userinfoblock state]
-                 (into [:div];#profile]
-                       (for [index (range (count @blocks))]
-                         (ph/block (cursor blocks [index]) state index)))]]]]]]]
-      @(cursor state [:tab-content]))]))
+               :class "page-content"}
+         [:div.panel
+          [:div.panel-left
+           [:div.panel-right
+            [:div.panel-content
+             [:div.panel-body
+              [userinfoblock state]
+              (into [:div];#profile]
+                    (for [index (range (count @blocks))]
+                      (ph/block (cursor blocks [index]) state index)))]]]]]]]
+       @(cursor state [:tab-content]))]))
 
 (defn theme-selection [theme-atom themes]
   (reduce (fn [r theme]

    (fn []
      (cond
        (= "initial" (:permission @state)) (layout/default site-navi [:div])
        (and user (= "error" (:permission @state)))(layout/default-no-sidebar site-navi (err/error-content))
        (= "error" (:permission @state)) (layout/landing-page site-navi (err/error-content))
        (= (:id user) (js/parseInt user-id)) (layout/default site-navi (content state))
        (and (= "success" (:permission @state)) user) (layout/default-no-sidebar site-navi (content state))

                     [:a {:href "#" :on-click #(do
                                                 (.preventDefault %)
                                                 (reset! theme-atom (js/parseInt (:id theme))))
                          :alt (t (:name theme)) :title (t (:name theme))
                          :aria-label (str (t :page/Selecttheme) " " (:id theme))}
                      [:div {:class (str "panel-right theme-container" (if (= @theme-atom (:id theme)) " selected"))} " "]]]))
          [:div {:id "theme-container"}] themes))

(defn edit-theme [state]
