Fixing for rails 4.