fix for older ruby versions