fixing to rails 4