fixing for ActiveRecord 4.0rc1