added gem to stop invalid encoding error