some rails 4 fixes