fix some of the bugs, still no io on Linux