Fix for ruby version >2