Fix DragonFly iostream segfault bug