forward port stringio fix from 0.4.1