fix rails 4 issue