made a minor change to make it backward compatible for Ruby 1.9.*