Fixes ActiveRecord::Relation issue

See #40.