fixing some rails 3 deprication