Make changes necessary for rails 4