fix for rails4