Fixed compatibility with Ruby 2.1