Rails4 fix