diff --git a/app/models/legislation/annotation.rb b/app/models/legislation/annotation.rb
index 096565404..aa1f2ed80 100644
--- a/app/models/legislation/annotation.rb
+++ b/app/models/legislation/annotation.rb
@@ -29,7 +29,7 @@ class Legislation::Annotation < ActiveRecord::Base
doc = Nokogiri::HTML(html)
selector = "/#{range_start}"
text = doc.xpath(selector).text
- text[quote] = "#{quote}"
+ text[range_start_offset .. range_end_offset-1] = "#{quote}"
self.context = text
end