                       (name fk)])
         entries-list (reaction
                        (let [entries-map @entries-map
-                             sorter (entry-compare :task)
                              find-missing (u/find-missing-entry entries-map put-fn)
                              entries (->> @started-tasks
                                           (map (fn [ts] (find-missing ts)))
                                           (filter on-hold-filter)
                                           (filter saga-filter)
-                                          (sort sorter))
+                                          (sort task-sorter))
                              conf (merge @cfg @options)]
                          (if (:show-pvt @cfg)
                            entries

        entries-list
        (reaction
          (let [entries-map @entries-map
                sorter (entry-compare :habit)
                find-missing (u/find-missing-entry entries-map put-fn)
                entries (->> @waiting-habits
                             (map (fn [ts] (find-missing ts)))
                             (sort sorter))
                conf (merge @cfg @options)]
            (if (:show-pvt @cfg)
              entries

                 [:td [:strong story]]
                 [:td.time (u/duration-string v)]]))]])))))

(defn habit-sorter
  "Sorts tasks."
  [x y]
  (let [c (compare (get-in x [:habit :priority] :X)
                   (get-in y [:habit :priority] :X))]
    (if (not= c 0) c (compare (get-in y [:habit :points])
                              (get-in x [:habit :points])))))

(defn waiting-habits-list
  "Renders table with open entries, such as started tasks and open habits."
