fixes for upgrading rails