Fix bug with ruby 1.9