 		out
 
 	release: =>
-		for sound in @sounds
-			sound.release()
+		sound.release() for sound in @sounds
 
 		for range, i in @annotator.ranges when range is @
-			@annotator.ranges.splice(i, 1)
+			# Modify the annotator's range list in a timeout so that its
+			# release method doesn't modify the array it iterates over.
+			index = i # By the time the timeout fires i will be the array's length.
+			setTimeout(
+				=> @annotator.ranges.splice(index, 1)
+				0
+			)
 
 		super
 

		@ranges.push(range)

	release: =>
		for range in @ranges
			range.release()
		super

	# Convert a number between 0 and 1 to a frequency in this annotator's range.

	release: =>
		# Remove this sound from its parent frequency's list.
		for sound, i in @frequencyRange.sounds when sound is @
			# Modify the frequency's sound list in a timeout so that its
			# release method doesn't modify the array it iterates over.
			index = i
			setTimeout(
				=> @frequencyRange.sounds.splice(index, 1)
				0
			)

		super

