fix a ruby 1.9. api problem