Fix regarding rails 3