fix StringIO calls