minor bug fix in IO