Fixed a runtime error in Ruby 1.8.7