fixes to ruby2 migration