This shouldn't be needed in Rails 4