fixes for 4.1.4 rails update
adding separate files for part 1 and 2