Modify to work with ruby1.9.3