rails4 fixes