fixed for ruby 2