fix rails <4 regression