fix #1942 iostring bug