fix to rails 4