Fix issue with rails4.