Fix memory leak

http://stackoverflow.com/questions/13429017/memory-leak-in-rails-app-string-nightmare