fix rails 4 warnings