Fixed support for ruby 2 (UTF-8 encoding error)