fixing warnings in Ruby 2.1