fix to use with rails4 chnaging maximum to max