     }
     
     func windowWillClose(note: NSNotification!) {
-        player?.cancelPendingPrerolls()
-        player?.pause()
+        if let player = player {
+            player.cancelPendingPrerolls()
+            player.pause()
+            removeRateObserver(player: player)
+        }
         asset = nil
         item = nil
         player = nil

        if let url = NSURL(string: videoURL!) {
            if event == nil {
                player = AVPlayer(URL: url)
                playerView.player = player
                
                // SESSION

                dispatch_async(dispatch_get_main_queue()) {
                    self.progressIndicator.stopAnimation(nil)
                    self.player?.play()
                }
            }
        } else if keyPath == "rate" {
            if let change = change,
               let newRate = change[NSKeyValueChangeNewKey] as? Float,
               let oldRate = change[NSKeyValueChangeOldKey] as? Float
            {
                if oldRate == 0.0 && newRate == 1.0 { // play button tapped
                    player!.rate = rate // set rate to stored one
                } else if newRate != 0.0 { // change rate button tapped
                    rate = newRate // store rate
                }
            }
        } else {
