multiple fixes + upgrade rails