more IO in the wrong place fixed