more fixes for rails 4