Fix for problem with too many results causing out-of-memory errors in Rails. Short-term fix for issue #55