Fixed Rails4 support