Updated to work with Ruby 2.0