minor fixes to run in Ruby 2.1.x