fixing while-loop in IO
Merge branch 'IO'