bugfix for rails4