   (defn on-play []
     (if (nil? position)
       (.setPosition (:current-sound @app-state/app-state) (.-MAX_SAFE_INTEGER js/Number))))
-
+  (println "DURATION" (get-duration))
   (.play (:current-sound @app-state/app-state)
                #js {:whileplaying while-playing
                     :onplay on-play
-                    :from position})
+                    :from (if (> (get-duration) position)
+                            position
+                            (get-duration))})
 
   (println "POSITION:" position)
   (if (:paused? @app-state/app-state)

  (.resume (:current-sound @app-state/app-state))
  (swap! app-state/app-state assoc :paused? false))

(defn load-track! [sound-url sound-id on-load-fn]
  (.createSound js/soundManager #js {:id sound-id
                                     :url sound-url

    0
    (.-position (:current-sound @app-state/app-state))))

(defn is-sound-loaded? []
  (not (nil? (:current-sound @app-state/app-state))))

