fixed compatibility problem with Ruby < 2.1