Fixes encoding error with ruby 1.9