                            (str (format "%.2f " (/ (nth stats-values i) 1000.0)) (get (find-first data/stats "Row" (nth stats-keys i)) "Id")))
                          (range (count stats-keys)))))
                  "N/A"))
-             "Unknown")]]]))
-
+             (let [row (first (filter #(> (count (get %1 "Quality_StatsKeys")) 0) (find-all data/granted-effects-per-level "GrantedEffectsKey" (get skill-gem "GrantedEffectsKey"))))]
+               (if row
+                 (let [stats-keys (get row "Quality_StatsKeys")
+                       stats-values (get row "Quality_Values")]
+                   (string/join
+                    ", "
+                    (map (fn [i]
+                           (str (format "%.2f " (/ (nth stats-values i) 1000.0)) (get (find-first data/stats "Row" (nth stats-keys i)) "Id")))
+                         (range (count stats-keys))))))))]]]))
+
+(find-first data/skill-gems "BaseItemTypesKey" 1531)
 (defn skillgem-page [id]
   (fn [ctx]
     (let [item (find-first data/base-item-types "Row" id)
-          meta (find-first data/active-skills "DisplayedName" (get item "Name"))]
+          skill-gem (find-first data/skill-gems "BaseItemTypesKey" id)
+          active-skill (find-first data/active-skills "DisplayedName" (get item "Name"))]
       (layout-page
        ctx
        (get item "Name")
        [:div
         [:h1 (get item "Name")]
-        (if meta
-          [:div
-           [:div.skill-small-table
-            (get-skill-small-table item meta id)
-             [:img {:style "padding-top: 10px; width: 100%" :src (get meta "WebsiteImage")}]]
-           [:p (get meta "Description")]])
+        [:div
+         [:div.skill-small-table
+          (get-skill-small-table item active-skill id skill-gem)
+          [:img {:style "padding-top: 10px; width: 100%" :src (get active-skill "WebsiteImage")}]]
+         [:p (get active-skill "Description")]]
         [:h3 {:style "clear: both"} "Quest rewards"]
         [:table
          [:tr

                       (assoc (find-first data/quests "Row" (get quest-state "QuestKey"))
                              "CharactersKey" (first (get quest-vendor-reward "CharactersKeys")))))))
               (find-all-contains data/quest-vendor-rewards "BaseItemTypesKeys" id)))]
        (if meta
          (let [ge (filter
                    #(> (count (get %1 "Quality_StatsKeys")) 0)
                    (find-all data/granted-effects-per-level "ActiveSkillsKey" (get meta "Row")))
                stat-keys (if (> (count ge) 0)
                            (get (first ge) "StatsKeys")
                            '())]

        [:li [:a {:href "/affixes/"} "Affixes"]]
        [:li [:a {:href "/quests/"} "Quests"]]
        [:li [:a {:href "/archive/"} "Archive"]]
        [:li [:a {:href "/data/"} "Data"]]
        [:li [:a {:href "/changelog/"} "Changelog"]]]]]]
    [:div.container
     [:div.main
      page]]
