fix older versions of ruby