Try to fix some ruby 1.8 bugs