fixed issue with stringio failing to read/write