fixing some ruby new version bugs