                     :on-click #(dispatch [:page-memories i])}
                [:a (str (inc i))]]
               ))
-          [:li {:class (if (>= @current @pages) "disabled")}
+          [:li {:class (if (>= @current (dec @pages)) "disabled")}
            [:a {:on-click #(dispatch [:page-memories (inc @current)])} "»"]]]]
         ))
     )

(register-handler
  :page-memories
  (fn [app-state [_ i]]
    (let [max (dec (get-in app-state [:ui-state :memories :pages]))
          idx (Math/max 0 (Math/min max i))]
      (assoc-in app-state [:ui-state :results-page] idx))
    ))


  :load-memories-success
  (fn [app-state [_ memories]]
    (-> app-state
        (assoc-in [:ui-state :results-page] (:current-page memories))
        (assoc-in [:ui-state :memories] memories)
        (assoc-in [:ui-state :is-searching?] false))
    ))
