fixing issues involving rails 4