Fix issue with Rails 3.2