                                                            :to selected-end-date})))))
             route-update (fn [updated-state]
                            (let [state (merge @state updated-state)
-                                 {:keys [selected-detector selected-filter selected-metric selected-date-range]} state
+                                 {:keys [selected-detector metrics-filter selected-metric selected-date-range]} state
                                  [from to] selected-date-range]
                              (if selected-metric
                                (routing/goto :detector-id (:id selected-detector)
-                                             :metrics-filter selected-filter
+                                             :metrics-filter metrics-filter
                                              :metric-id (:id selected-metric)
                                              :from from
                                              :to to)
                                (routing/goto :detector-id (:id selected-detector)
-                                             :metrics-filter selected-filter
+                                             :metrics-filter metrics-filter
                                              :from from
                                              :to to))))
             route-handler (fn [state event-channel]

                  (when (not= pre-query (extract-query)) (retrieve-alerts)))

                :filter-selected
                (route-update {:selected-filter message})

                :detector-selected
                (route-update {:selected-detector message

                        :subscriptions []
                        :selected-detector nil
                        :selected-metric nil
                        :metrics-filter nil
                        :selected-date-range [start-date end-date]
                        :error {}})))

