fixed some bugs from i/o refactor