fix for activerecord 4.0.2