fixes for rails4