Fixed for use with ruby 1.9