rails 4 fixes