Fix to run in newer versions of ruby