Fix custom StringIO